package com.kaishengit.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaishengit.dao.ProjectDao;
import com.kaishengit.pojo.Project;

@Service
@Transactional
public class ProjectService {
	private ProjectDao projectDao;
	public void save(Project project){
		projectDao.save(project);
	}
	@Transactional(readOnly=true)
	public Project findById(int id){
		return projectDao.findById(id);
	}
	@Transactional(readOnly=true)
	public List<Project> findAll(){
		return projectDao.findAll();
	}
	@Autowired
	public void setProjectDao(ProjectDao projectDao) {
		this.projectDao = projectDao;
	}
	
}
